package com.cai.primeton.entity;

import io.swagger.annotations.ApiModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.naming.Name;
import javax.persistence.*;
import java.util.Date;

/**
 * @version 1.0
 * @author：蔡松坡
 * @date：2021/7/1 11 : 35
 * @package：com.cai.primeton.entity
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Entity(name = "pborrow")
@ApiModel(value = "借阅实体")
public class PBorrow {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;
    @Column(name = "userid")
    private Integer userid;//借阅人id
    @Column(name = "bookid")
    private Integer bookid; //图示id
    @Column(name = "booknum")
    private Long booknum;  //图书编号
    @Column(name = "bookname")
    private String bookname;  //图书名称
    @Column(name = "useraccount")
    private String useraccount;//用户账号
    @Column(name = "username")
    private String username;  //用户名称
    @Column(name = "presstime")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date presstime;  //借阅时间
    @Column(name = "backtime")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date backtime;//归还时间
    @Column(name = "state")
    private String state; //借阅状态  借阅  成功

}
